package cn.edu.pku.ss.lbs.stub;

import cn.edu.pku.ss.lbs.position.SignalProcessor;
import cn.edu.pku.ss.lbs.position.SignalRecord;

public class ExperimentSignalProcessor implements SignalProcessor {
    private String station;
    private String terminal;

    public ExperimentSignalProcessor(String station, String terminal) {
        this.station = station;
        this.terminal = terminal;
    }

    public synchronized void process(SignalRecord signal) {
        if (!signal.getStation().equals(station)) return;
        if (!signal.getTerminal().equals(terminal)) return;
        System.out.println("" + signal.getTime() + ',' + signal.getRssi());
    }
}